<!--
 * @Description: 
 * @Author: xiao li
 * @Date: 2021-07-04 00:16:06
 * @LastEditTime: 2021-11-03 15:08:24
 * @LastEditors: xiao li
-->
<template>
  <div v-html="fHtml" class="lb-footer"></div>
</template>

<script>
export default {
  data () {
    return {
      fHtml: ''
    }
  },
  created () {
    this.getCopyrightInfo()
  },
  methods: {
    getCopyrightInfo () {
      this.$api.getCopyrightInfo().then(res => {
        if (res.code === 200) {
          if (res.data === 1) {
            this.fHtml = ''
          } else {
            if (!res.data.footerleft) {
              this.fHtml =
                `<div>Powered by <a class='el-link el-link--info' href="http://www.we7.cc"><b>微擎</b></a>
                  v${res.data.version} © 2014-2015
                  <a class='el-link el-link--info' href="http://www.we7.cc">www.we7.cc</a></div>`
            } else {
              this.fHtml = res.data.footerleft
            }
            if (res.data.icp) {
              this.fHtml = this.fHtml +
                `<div>备案号：<a class='el-link el-link--info' href="http://www.miitbeian.gov.cn" target="_blank">${res.data.icp}</a></div>`
            }
          }
        }
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.lb-footer {
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: center;
  line-height: 50px;
}
</style>
